﻿using MediatR;
using RBAC.LuFang.API.Application.Command.BreedCommand;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.BreedCommandHandler
{
    //反填养殖信息
    public class BreedFanCommandHandler:IRequestHandler<BreedFanCommand, BreedInfo>
    {
        private readonly IGoodsService _goodsService;

        public BreedFanCommandHandler(IGoodsService goodsService)
        {
            _goodsService = goodsService;
        }

        public async Task<BreedInfo> Handle(BreedFanCommand request, CancellationToken cancellationToken)
        {
            return await _goodsService.FanBreed(request.goodsid);
        }
    }
}
